<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/html/js/axios.min.js"></script>
    <script src="/html/js/util.js"></script>
    <script>
        window.onload = function (){
            var info = getQuery("info");
            if(info == "noland"){
                $("infoDiv").innerHTML = "对不起，请先登陆";
            }
        }

        async function land(){
            var info = await ajaxGet("/user/land",
                {userName:$("userName").value,pwd:$("pwd").value});
            if(info == "ok"){
                location.href = "/html/index.html";
            }
            else{
                alert("登陆失败");
            }
        }
    </script>
</head>
<body>
    <div id="infoDiv" style="color: red;font-size: 12px;"></div>
    用户名：<input type="text" id="userName"><br>
    密码：<input type="password" id="pwd"><br>
    <input type="button" value="登陆" onclick="land()">
</body>
</html>